class base{
    private int x;
    private int y;

    public base(int x,int y){
        this.x=x;
        this.y=y;
    }

    public int getx(){
        return x;
    }

    public int gety(){
        return y;
    }
}

class sub extends base{
    private int z;

    public sub(int x,int y,int z){
        super(x,y);
        this.z=z;
    }

    public int getz(){
        return z;
    }

    public int calculate(){
        return super.getx()*super.gety()*this.getz();
    }

}

class myvalue{
    private int val;

    public int getval(){
        return val;
    }

    public void setval(int val){
        this.val=val;
    }

}

public class test_11_14 {
    public static void swap(myvalue myv1,myvalue myv2){
        int tmp=myv1.getval();
        myv1.setval(myv2.getval());
        myv2.setval(tmp);

    }

    public static void main(String[] args) {
        myvalue m1=new myvalue();
        m1.setval(10);

        myvalue m2=new myvalue();
        m2.setval(20);

        swap(m1,m2);

        System.out.println(m1.getval());
        System.out.println(m2.getval());
    }

}




